package com.jungle.common.core.domain.model;

import com.jungle.common.constant.UserConstants;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 使用短信验证码重新设置密码
 *
 * @author Lion Li
 */
@Data
public class ResetPwdBySmsCodeBody {

    /**
     * 用户名
     */
    @NotBlank(message = "{user.phonenumber.not.blank}")
    private String phonenumber;

    /**
     * 短信验证码
     */
    @NotBlank(message = "{sms.code.not.blank}")
    private String code;

    /**
     * 新密码
     */
    @NotBlank(message = "{user.password.not.blank}")
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "{user.password.length.valid}")
    private String password;

}
